#pragma once

#include <cstdlib>
#include <iostream>
#include <string>
#include <fstream>
#include <vector>

#include "Constant.h"
#include "Position.h"
#include "Labyrinth.h"
#include "Bomb.h"

class Player
{
protected:
	Labyrinth& labyrinth;
	char representation;
	
	Position currentPosition;
	Position birthPosition;
	static int numberOfPlayers;
	char cell;
	int range;
	int numberOfBombs;
	
public:
	Player(Labyrinth&, char);
	~Player();
	
	void increaseRange () { range++; }
	void decreaseRange () { range--; }
	void increaseBombNumber () { numberOfBombs++; }
	void decreaseBombNumber () { numberOfBombs--; }
	
	Position getCurrentPosition () { return currentPosition; }
    Position getBirthPosition () { return birthPosition; }
	static int getNumberOfPlayers () { return numberOfPlayers; }  
	char getRepresentation() const { return representation; }
	
    void setCurrentPosition (Position _currentPosition) { currentPosition = _currentPosition; }
    void setBirthPosition (Position _birthPosition) { birthPosition = _birthPosition; }
    static void setNumberOfPlayers (int _numberOfPlayers) { numberOfPlayers = _numberOfPlayers; }
	
	bool canMove (Direction);
	virtual void move (Direction);
	
	void placeBomb (vector<Bomb>&, float&);
	void die ();
	
	int getRange () {return range;}
	int getNumberOfBombs () {return numberOfBombs;}
};



















